package com.heima.utils.threadLocal;

public class UserIdThreadLocal {

    private static final ThreadLocal<Integer> USERID_LOCAL = new ThreadLocal<>();

    public static void setUserId(Integer userId){
        USERID_LOCAL.set(userId);
    }

    public static Integer getUserId(){
        return USERID_LOCAL.get();
    }

    public static void remove(){
        USERID_LOCAL.remove();
    }
}
